<?php include('source/mailer/PHPMailer_5.2.1/class.phpmailer.php'); ?>
<?php include('source/mailer/PHPMailer_5.2.1/class.smtp.php'); ?>
<?php //include('source/mailer/PHPMailer_5.2.1/language/phpmailer.lang-ar.php'); ?>
<?php

/*
	$mail             = new PHPMailer(); // defaults to using php "mail()"
	
	//$body             = file_get_contents('contents.html');
	//$body             = preg_replace('/[\]/i','',$body);
	
	
	$body 	= "test aja";
	
	$mail->AddReplyTo("report@madebymvz.com","Ronald");

	$mail->SetFrom("report@madebymvz.com","Ronald");

	$mail->AddReplyTo("report@madebymvz.com","Ronald");

	
	$address = "report@madebymvz.com";
	$alias = "Ronald";
	$mail->AddAddress($address, $alias);
	
	$mail->Subject    = "PHPMailer Test Subject via mail(), basic";

	$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test

	$mail->MsgHTML($body);

	//$mail->AddAttachment("images/phpmailer.gif");      // attachment
	//$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment

	if(!$mail->Send()) {
	  echo "Mailer Error: " . $mail->ErrorInfo;
	} else {
	  echo "Message sent!";
	}
*/
	$mailFrom = "system@madebymvz.com";
	$mailFromPass = "MaveMBM!@#456";
	$mailTo = "report@madebymvz.com";
	$mailServer = "mail.madebymvz.com";

	$mail = new phpmailer();

	// setting
	//$mail->IsMail();   					// send via SMTP
	$mail->IsSMTP();   					// send via SMTP
	$mail->Host     = $mailServer; 		// SMTP servers
	$mail->SMTPAuth = true;     		// turn on SMTP authentication
	$mail->Username = $mailFrom;  		// SMTP username
	$mail->Password = $mailFromPass; 	// SMTP password

	// pengirim
	$mail->From     = $mailFrom;
	$mail->FromName = 'Admin Website Tekindo Utama';

	// kirim balik
	$mail->AddReplyTo($mailFrom,"Admin");
	$mail->WordWrap = 50; 				// set word wrap
	$mail->IsHTML(true);				// send as HTML

	$mail->Subject  = "Test Subject cape de<br />asd baris 2";
	
	$isi_email = "asd qwe";
	
	$msg_preg = preg_replace('/[^a-z0-9 \r\n]/i', '1a2b3c', $isi_email);
	$msg_rep1 = str_replace('1a2b3cr1a2b3cn','<br />',$msg_preg);
	$msg_rep2 = str_replace('1a2b3c','',$msg_rep1);
	$msg = str_replace('1a2b3c','',$msg_rep2);
	
	

	$mail->Body     =  $msg;
	
	$mail->AddAddress('report@madebymvz.com','Report - Made by MvZ');	// Copy if u want to send more than 1 recipient

	//$mail->Send();
	if(!$mail->Send()) {
	  echo "Mailer Error: " . $mail->ErrorInfo;
	} else {
	  echo "Message sent!";
	}
	$mail->ClearAddresses();
	
	
	
?>